<?php
/**
 * Spaph_Reg
 *
 * Wrapper to access Spaph::$Reg
 */
class Spaph_Reg {
    public function get($prop) { return $this->$prop; }
    public function set($prop,$val) { $this->$prop = $val; }

    public function __get($prop)
    {
       if(isset(Spaph::$Reg[$prop]))
           return Spaph::$Reg[$prop];

       throw new Exception('Undefined Spaph Reg: ' . $prop);
    }

    public function __set($prop,$val)
    {
        Spaph::$Reg[$prop] = $val;
    }
}

